Optimal. Leaf size=140 \[ -\frac {a^2 c \cos ^2(e+f x)^{\frac {3+p}{2}} \, _2F_1\left (\frac {3}{2},\frac {3+p}{2};\frac {5}{2};\sin ^2(e+f x)\right ) (g \sec (e+f x))^p \tan ^3(e+f x)}{3 f}-\frac {a^2 c \cos ^2(e+f x)^{\frac {4+p}{2}} \, _2F_1\left (\frac {3}{2},\frac {4+p}{2};\frac {5}{2};\sin ^2(e+f x)\right ) (g \sec (e+f x))^{1+p} \tan ^3(e+f x)}{3 f g} \]
[Out]
________________________________________________________________________________________
Rubi [A]
time = 0.14, antiderivative size = 140, normalized size of antiderivative = 1.00, number of steps
used = 5, number of rules used = 3, integrand size = 34, \(\frac {\text {number of rules}}{\text {integrand size}}\) = 0.088, Rules used = {4047, 2697, 16}
\begin {gather*} -\frac {a^2 c \tan ^3(e+f x) \cos ^2(e+f x)^{\frac {p+3}{2}} (g \sec (e+f x))^p \, _2F_1\left (\frac {3}{2},\frac {p+3}{2};\frac {5}{2};\sin ^2(e+f x)\right )}{3 f}-\frac {a^2 c \tan ^3(e+f x) \cos ^2(e+f x)^{\frac {p+4}{2}} (g \sec (e+f x))^{p+1} \, _2F_1\left (\frac {3}{2},\frac {p+4}{2};\frac {5}{2};\sin ^2(e+f x)\right )}{3 f g} \end {gather*}
Antiderivative was successfully verified.
[In]
[Out]
Rule 16
Rule 2697
Rule 4047
Rubi steps
\begin {align*} \int (g \sec (e+f x))^p (a+a \sec (e+f x))^2 (c-c \sec (e+f x)) \, dx &=-\left ((a c) \int \left (a (g \sec (e+f x))^p \tan ^2(e+f x)+a \sec (e+f x) (g \sec (e+f x))^p \tan ^2(e+f x)\right ) \, dx\right )\\ &=-\left (\left (a^2 c\right ) \int (g \sec (e+f x))^p \tan ^2(e+f x) \, dx\right )-\left (a^2 c\right ) \int \sec (e+f x) (g \sec (e+f x))^p \tan ^2(e+f x) \, dx\\ &=-\frac {a^2 c \cos ^2(e+f x)^{\frac {3+p}{2}} \, _2F_1\left (\frac {3}{2},\frac {3+p}{2};\frac {5}{2};\sin ^2(e+f x)\right ) (g \sec (e+f x))^p \tan ^3(e+f x)}{3 f}-\frac {\left (a^2 c\right ) \int (g \sec (e+f x))^{1+p} \tan ^2(e+f x) \, dx}{g}\\ &=-\frac {a^2 c \cos ^2(e+f x)^{\frac {3+p}{2}} \, _2F_1\left (\frac {3}{2},\frac {3+p}{2};\frac {5}{2};\sin ^2(e+f x)\right ) (g \sec (e+f x))^p \tan ^3(e+f x)}{3 f}-\frac {a^2 c \cos ^2(e+f x)^{\frac {4+p}{2}} \, _2F_1\left (\frac {3}{2},\frac {4+p}{2};\frac {5}{2};\sin ^2(e+f x)\right ) (g \sec (e+f x))^{1+p} \tan ^3(e+f x)}{3 f g}\\ \end {align*}
________________________________________________________________________________________
Mathematica [C] Result contains higher order function than in optimal. Order 6 vs. order 5 in
optimal.
time = 30.37, size = 7087, normalized size = 50.62 \begin {gather*} \text {Result too large to show} \end {gather*}
Warning: Unable to verify antiderivative.
[In]
[Out]
________________________________________________________________________________________
Maple [F]
time = 0.18, size = 0, normalized size = 0.00 \[\int \left (g \sec \left (f x +e \right )\right )^{p} \left (a +a \sec \left (f x +e \right )\right )^{2} \left (c -c \sec \left (f x +e \right )\right )\, dx\]
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Maxima [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {Failed to integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Fricas [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Sympy [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} - a^{2} c \left (\int \left (- \left (g \sec {\left (e + f x \right )}\right )^{p}\right )\, dx + \int \left (- \left (g \sec {\left (e + f x \right )}\right )^{p} \sec {\left (e + f x \right )}\right )\, dx + \int \left (g \sec {\left (e + f x \right )}\right )^{p} \sec ^{2}{\left (e + f x \right )}\, dx + \int \left (g \sec {\left (e + f x \right )}\right )^{p} \sec ^{3}{\left (e + f x \right )}\, dx\right ) \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Giac [F]
time = 0.00, size = 0, normalized size = 0.00 \begin {gather*} \text {could not integrate} \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________
Mupad [F]
time = 0.00, size = -1, normalized size = -0.01 \begin {gather*} \int {\left (a+\frac {a}{\cos \left (e+f\,x\right )}\right )}^2\,\left (c-\frac {c}{\cos \left (e+f\,x\right )}\right )\,{\left (\frac {g}{\cos \left (e+f\,x\right )}\right )}^p \,d x \end {gather*}
Verification of antiderivative is not currently implemented for this CAS.
[In]
[Out]
________________________________________________________________________________________